package exception;

public class ThrwDemo {
    public static void main(String[] args) {
        Person person = new Person();
        try {
            person.setAge(1000);
        }catch (IllegalAgeException e){
            e.printStackTrace();
            System.out.println(e.getMessage());
        }

        System.out.println(person.getAge());
    }
}
